package com.gillion.grule.client.logger;


import java.util.Objects;

public class Log extends BaseLog {
    private String timeId;
    private Integer errorCount;
    private Integer totalCount;
    private Integer avgRT;


    // Override equals method
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        Log log = (Log) o;
        return Objects.equals(timeId, log.timeId) &&
                Objects.equals(errorCount, log.errorCount) &&
                Objects.equals(totalCount, log.totalCount) &&
                Objects.equals(avgRT, log.avgRT);
    }

    // Override hashCode method
    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), timeId, errorCount, totalCount, avgRT);
    }

    // Override toString method
    @Override
    public String toString() {
        return "Log{" +
                "timeId='" + timeId + '\'' +
                ", errorCount=" + errorCount +
                ", totalCount=" + totalCount +
                ", avgRT=" + avgRT +
                ", groupId='" + groupId + '\'' +
                ", artifactId='" + artifactId + '\'' +
                ", version='" + version + '\'' +
                ", executeTime=" + executeTime +
                '}';
    }



    public String getTimeId() {
        return this.timeId;
    }

    public void setTimeId(String timeId) {
        this.timeId = timeId;
    }

    public Integer getErrorCount() {
        return this.errorCount;
    }

    public void setErrorCount(Integer errorCount) {
        this.errorCount = errorCount;
    }

    public Integer getTotalCount() {
        return this.totalCount;
    }

    public void setTotalCount(Integer totalCount) {
        this.totalCount = totalCount;
    }

    public Integer getAvgRT() {
        return this.avgRT;
    }

    public void setAvgRT(Integer avgRT) {
        this.avgRT = avgRT;
    }
}
